package com.scx.bizmq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.Map;

@Component
public class BiMessageProducer {
    @Resource
    private RabbitTemplate rabbitTemplate;

    public void sendMessage(Map<String,Object> message) {
        String exchange = "chart.exchange";
        String routingKey = "chartByAi";
        rabbitTemplate.convertAndSend(exchange,routingKey,message);
    }
}
